package com.youkeyi.ddy.cloud.common.api.application.business.storage.vaccinum;

import com.youkeyi.ddy.cloud.common.api.application.business.storage.vaccinum.dto.BusinessVaccinumListCloudDto;
import com.youkeyi.ddy.cloud.common.api.application.business.storage.vaccinum.param.BusinessVaccinumCreateCloudParam;
import com.youkeyi.ddy.cloud.common.api.application.business.storage.vaccinum.param.BusinessVaccinumDeleteCloudParam;
import com.youkeyi.ddy.cloud.common.api.application.business.storage.vaccinum.param.BusinessVaccinumListCloudParam;
import com.youkeyi.ddy.cloud.common.api.application.business.storage.vaccinum.param.BusinessVaccinumUpdateCloudParam;
import com.youkeyi.ddy.cloud.common.response.ResponseContent;
import io.swagger.annotations.*;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.*;

/**
 * 系统疫苗商品
 *
 * @author  liuxiawang
 * @Date 5/24/22 10:36 PM
 * @Location shenzhen.china
 */
@Api(tags = {"【BUSINESS】vaccinum management"})
@RestController
@FeignClient(value = "YOUKEYI-DDY-CLOUD-APPLICATION-BUSINESS", fallback = BusinessVaccinumCloudServiceFallback.class)
@RequestMapping("/business/vaccinum")
public interface BusinessVaccinumCloudService {

    // 查询疫苗商品列表
    @ApiOperation(value = "Query Business Vaccinum List", authorizations = {@Authorization("com.youkeyi.ddy.cloud.common.api.application.business.storage.vaccinum.BusinessVaccinumCloudService.list")})
    @ApiResponse(code = 200, message = "data Property in Response Body", response = BusinessVaccinumListCloudDto.class)
    @ApiImplicitParams({
            @ApiImplicitParam(name = "param", paramType = "query", value = "Param of Query Business Vaccinum List", dataType = "BusinessVaccinumListCloudParam", dataTypeClass = BusinessVaccinumListCloudParam.class),
    })
    @GetMapping
    public abstract BusinessVaccinumListCloudDto list(BusinessVaccinumListCloudParam param);

    // 创建疫苗商品
    @ApiOperation(value = "Create Business Vaccinum", authorizations = {@Authorization("com.youkeyi.ddy.cloud.common.api.application.business.storage.vaccinum.BusinessVaccinumCloudService.create")})
    @ApiResponse(code = 200, message = "data Property in Response Body", response = ResponseContent.class)
    @ApiImplicitParams({
            @ApiImplicitParam(name = "param", paramType = "body", value = "Param of Create Business Vaccinum", dataType = "BusinessVaccinumCreateCloudParam", dataTypeClass = BusinessVaccinumCreateCloudParam.class),
    })
    @PostMapping("/create")
    public abstract ResponseContent create(@RequestBody BusinessVaccinumCreateCloudParam param);


    // 编辑疫苗商品
    @ApiOperation(value = "Update Business Vaccinum", authorizations = {@Authorization("com.youkeyi.ddy.cloud.common.api.application.business.storage.vaccinum.BusinessVaccinumCloudService.update")})
    @ApiResponse(code = 200, message = "data Property in Response Body", response = ResponseContent.class)
    @ApiImplicitParams({
            @ApiImplicitParam(name = "param", paramType = "body", value = "Param of Update Business Vaccinum", dataType = "BusinessVaccinumUpdateCloudParam", dataTypeClass = BusinessVaccinumUpdateCloudParam.class),
    })
    @PatchMapping("update")
    public abstract ResponseContent update(@RequestBody BusinessVaccinumUpdateCloudParam param);


    // 删除疫苗商品
    @ApiOperation(value = "Delete Business Vaccinum", authorizations = {@Authorization("com.youkeyi.ddy.cloud.common.api.application.business.storage.vaccinum.BusinessVaccinumCloudService.delete")})
    @ApiResponse(code = 200, message = "data Property in Response Body", response = ResponseContent.class)
    @ApiImplicitParams({
            @ApiImplicitParam(name = "param", paramType = "query", value = "Param of Delete Business Vaccinum", dataType = "BusinessVaccinumDeleteCloudParam", dataTypeClass = BusinessVaccinumDeleteCloudParam.class),
    })
    @DeleteMapping("/delete")
    public abstract ResponseContent delete(BusinessVaccinumDeleteCloudParam param);

}
